package com.shenmazong.servereduresume.controller;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shenmazong.servereduresume.dto.TbWork;
import com.shenmazong.servereduresume.service.TbWorkService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *工作经历表
 */
@RestController
@RequestMapping("work")
public class TbWorkController  {

    @Autowired
    private TbWorkService tbWorkService;

    @PostMapping("findByInformationId")
    public ResultResponse findByInformationId(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbWorkService.findByInformationId(batchChooseIdVo);
    }
    @PostMapping("saveOrUpdateWork")
    public ResultResponse saveOrUpdateWork(@RequestBody TbWork tbWork){
        return tbWorkService.saveOrUpdateWork(tbWork);
    }
    @PostMapping("deleteWork")
    public ResultResponse deleteWork(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbWorkService.deleteWork(batchChooseIdVo);
    }
}
